﻿<%@ Page Title="" Language="VB" MasterPageFile="~/MainLayout.master" AutoEventWireup="false" CodeFile="AuctionEntry.aspx.vb" Inherits="ValuationEntry" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>


<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <h1>Auction Management</h1>
    <hr />
    <asp:UpdatePanel ID="udpMessage" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <div runat="server" id="divError" class="msg-box-error" visible="false" enableviewstate="false">

                <span class="title">Error</span><br />
                <asp:Label ID="lblMsgError" runat="server" Text="ERROR" />
            </div>
            <div runat="server" id="divSuccessful" class="msg-box-success" visible="false" enableviewstate="false">

                <span class="title">Successful</span><br />
                <asp:Label ID="lblMsgSuccessful" runat="server" Text="Success" />

            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="upgContentGeneral" runat="server" AssociatedUpdatePanelID="upPropertyEntry">
        <ProgressTemplate>
            <div style="top: 0px; position: fixed; width: 100%; text-align: center">
                <span style="background-color: Yellow; font-weight: bold">Loading ...</span>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>


    <asp:Label ID="lblStaffUID" runat="server" Visible="false" />

    <p><%--Description of the page--%></p>
    <div class="form-container" id="divContentGeneral">
        <table width="100%">
            <tr>
                <td class="General-info-title" style="width: 150px;">
                    <h3>General Information</h3>
                </td>
                <td>
                    <div class="General-info-title-line"></div>
                </td>
            </tr>
        </table>
        <asp:UpdatePanel ID="upPropertyDetail" UpdateMode="Conditional" runat="server">
            <ContentTemplate>
                <table class="form-table" cellpadding="5" cellspacing="5">
                    <tr>
                        <th scope="row" style="width: 200px">Property Code :
                        </th>
                        <td style="width: 453px">
                            <asp:TextBox ID="txtLelongTipCode" runat="server" Width="300px" MaxLength="10" />
                            <%--<span style="color: Red">*<asp:RequiredFieldValidator ID="rfvLelongTipCode" ControlToValidate="txtLelongTipCode"
                                SetFocusOnError="true" runat="server" ValidationGroup="propertyentry" ErrorMessage="<br />Please enter a Property Code"
                                ForeColor="Red" Display="Dynamic" />
                                <asp:Label ID="lblExistLelongTipCodeError" runat="server" ForeColor="Red" /><asp:Button
                                    ID="btnVerify" runat="server" Text="Verify" Style="display: none" />
                            </span>--%>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: 200px">Property Type :
                        </th>
                        <td style="width: 453px">
                            <asp:DropDownList ID="ddlProperyType" runat="server">
                                <asp:ListItem Text="-SELECT-" Value="" Selected="True" />
                                <asp:ListItem Text="Others" Value="1" />
                                <asp:ListItem Text="Apartment/Condo" Value="2" />
                                <asp:ListItem Text="House" Value="3" />
                                <asp:ListItem Text="Flat" Value="4" />
                                <asp:ListItem Text="Factory" Value="5" />
                                <asp:ListItem Text="Shop/Office" Value="6" />
                                <asp:ListItem Text="Land" Value="7" />
                            </asp:DropDownList>
                            <span style="color: Red">*<asp:RequiredFieldValidator ID="rfvddlPropertyType" ControlToValidate="ddlProperyType"
                                SetFocusOnError="true" runat="server" ValidationGroup="propertyentry" ErrorMessage="<br />Please select a property type"
                                ForeColor="Red" Display="Dynamic" />
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: 200px">Unit No :
                        </th>
                        <td style="width: 453px">
                            <asp:TextBox ID="txtUnitNo" runat="server" Width="300px" MaxLength="50" />
                            <span style="color: Red">*<asp:RequiredFieldValidator ID="rfvtxtUnitNo" ControlToValidate="txtUnitNo"
                                SetFocusOnError="true" runat="server" ValidationGroup="propertyentry" ErrorMessage="<br />Please enter a Unit No"
                                ForeColor="Red" Display="Dynamic" />
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: 200px">Address :
                        </th>
                        <td style="width: 453px">
                            <asp:TextBox ID="txtAddress" Style="width: inherit" runat="server" MaxLength="300" />
                            <span style="color: Red">*<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtAddress"
                                SetFocusOnError="true" runat="server" ValidationGroup="propertyentry" ErrorMessage="<br />Please enter a address without unit no"
                                ForeColor="Red" Display="Dynamic" /></span>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: 200px">Price:
                        </th>
                        <td style="width: 453px">
                            <asp:TextBox ID="txtPrice" runat="server" Width="300px" onkeypress="return isNumberKeyOnly(event)" onpaste="return isNumberKeyOnly(event)" ToolTip="number only (eg: 70000)" PlaceHolder="number only, eg: 700000, cannot accept RM700,000"/>
                            <span style="color: Red">*<asp:RequiredFieldValidator ID="rfvtxtPrice" ControlToValidate="txtPrice"
                                SetFocusOnError="true" runat="server" ValidationGroup="propertyentry" ErrorMessage="<br />Please enter a price"
                                ForeColor="Red" Display="Dynamic" /></span>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: 200px">Land Area :
                        </th>
                        <td style="width: 453px">
                            <asp:TextBox ID="txtLandArea" runat="server" Width="300px" ToolTip="number only (eg: 1000)" PlaceHolder="number only, eg: 1000, cannot accept 1,000 ft"/>
                            <span style="color: Red">*
                        <asp:RequiredFieldValidator ID="rfvLandArea" ControlToValidate="txtLandArea" SetFocusOnError="true"
                            runat="server" ValidationGroup="propertyentry" ErrorMessage="<br />Please enter land area"
                            ForeColor="Red" Display="Dynamic" />
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: 200px">Unit :
                        </th>
                        <td style="width: 453px">
                            <asp:DropDownList ID="ddlUnit" runat="server">
                                <asp:ListItem Text="-SELECT-" Value="" Selected="True" />
                                <asp:ListItem Text="sq feet" Value="1" />
                                <asp:ListItem Text="meter square" Value="2" />
                                <asp:ListItem Text="acres" Value="3" />
                                <asp:ListItem Text="hectare" Value="4" />
                            </asp:DropDownList>
                            <span style="color: Red">*<asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="ddlUnit"
                                SetFocusOnError="true" runat="server" ValidationGroup="propertyentry" ErrorMessage="<br />Please select a proper unit"
                                ForeColor="Red" Display="Dynamic" />
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: 200px">Auction Time :
                        </th>
                        <td style="width: 453px">
                            <asp:TextBox ID="txtAuctionTime" Style="width: inherit" runat="server" MaxLength="30" TextMode="Time" PlaceHolder="this field is compulsory"/>
                            <span style="color: Red">*<asp:RequiredFieldValidator ID="rfvAuctionTime" ControlToValidate="txtAuctionTime" SetFocusOnError="true" runat="server" ValidationGroup="propertyentry" ErrorMessage="<br />Please enter valid time" ForeColor="Red" Display="Dynamic" /></span>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: 200px">Auction Date :
                        </th>
                        <td style="width: 453px">
                            <asp:TextBox ID="txtAuctionDate" Style="width: inherit" runat="server" MaxLength="30" ToolTip="date format (dd-MMM-yyyy)" PlaceHolder="date format(dd-MMM-yyyy) eg: 25-JUL-2015"/>
                            <asp:ImageButton runat="Server" ID="imgToDateCal" AlternateText="Click to show calendar" ImageUrl="~/images/style01/Btn-calendar.png" />
                            <cc1:CalendarExtender ID="ceToDate" runat="server" Format="dd-MMM-yyyy" TargetControlID="txtAuctionDate" PopupButtonID="imgToDateCal" />
                        </td>

                        <caption>
                            <span style="color: Red">*<asp:RequiredFieldValidator ID="rfvAuctionDate" runat="server" ControlToValidate="txtAuctionDate" Display="Dynamic" ErrorMessage="&lt;br /&gt;Please enter valid date" ForeColor="Red" SetFocusOnError="true" ValidationGroup="propertyentry" />
                            </span></td>
                        </caption>
                    </tr>
                    <tr>
                        <th scope="row" style="width: 200px">Auction Venue :
                        </th>
                        <td style="width: 453px">
                            <asp:TextBox ID="txtAuctionVenue" Style="width: inherit" runat="server" MaxLength="300" />
                            <span style="color: Red">*<asp:RequiredFieldValidator ID="rfvAuctionVenue" ControlToValidate="txtAuctionVenue" SetFocusOnError="true" runat="server" ValidationGroup="propertyentry" ErrorMessage="<br />Please enter valid auction venue" ForeColor="Red" Display="Dynamic" /></span>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: inherit">Auction Bank :
                        </th>
                        <td style="width: 453px">
                            <asp:DropDownList ID="ddlBank" runat="server">
                                <asp:ListItem Text="-SELECT-" Value="" Selected="True" />
                                <asp:ListItem Text="Maybank" Value="1" />
                                <asp:ListItem Text="Public" Value="2" />
                                <asp:ListItem Text="CIMB" Value="3" />
                                <asp:ListItem Text="Hong Leong" Value="4" />
                                <asp:ListItem Text="AmBank" Value="5" />
                                <asp:ListItem Text="Bank Rakyat" Value="6" />
                                <asp:ListItem Text="MBSB" Value="7" />
                                <asp:ListItem Text="Citibank" Value="8" />
                                <asp:ListItem Text="OCBC" Value="9" />
                                <asp:ListItem Text="HSBC" Value="10" />
                                <asp:ListItem Text="Alliance Bank" Value="11" />
                                <asp:ListItem Text="Standard Chartered" Value="12" />
                                <asp:ListItem Text="Bank Islam" Value="13" />
                                <asp:ListItem Text="RHB" Value="14" />
                                <asp:ListItem Text="UOB" Value="15" />
                                <asp:ListItem Text="Bank Islam" Value="16" />
                                <asp:ListItem Text="Muamalat" Value="17" />
                                <asp:ListItem Text="Bank Pertanian" Value="18" />
                                <asp:ListItem Text="Resolution Alliance" Value="19" />
                                <asp:ListItem Text="Other local" Value="20" />
                                <asp:ListItem Text="Other foreign" Value="21" />
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: inherit">Auctioneer :
                        </th>
                        <td style="width: 453px">
                            <asp:TextBox ID="txtAuctioneer" Style="width: inherit" runat="server" MaxLength="299" />
                            <span style="color: Red">*<asp:RequiredFieldValidator ID="rfvAuctioneer" ControlToValidate="txtAuctioneer" SetFocusOnError="true" runat="server" ValidationGroup="propertyentry" ErrorMessage="<br />Please enter valid auctioneer" ForeColor="Red" Display="Dynamic" /></span>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: inherit">Lawyer :
                        </th>
                        <td style="width: 453px">
                            <asp:TextBox ID="txtLawyer" Style="width: inherit" runat="server" MaxLength="299" />
                            <span style="color: Red">*<asp:RequiredFieldValidator ID="rfvLawyer" ControlToValidate="txtLawyer" SetFocusOnError="true" runat="server" ValidationGroup="propertyentry" ErrorMessage="<br />Please enter valid lawyer" ForeColor="Red" Display="Dynamic" /></span>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: inherit">Description :
                        </th>
                        <td style="width: 453px">
                            <asp:TextBox ID="txtDescription" Style="width: inherit" runat="server" MaxLength="500" TextMode="MultiLine" ToolTip="Valuation Details" />
                            <span style="color: Red">*<asp:RequiredFieldValidator ID="rfvDescription" ControlToValidate="txtDescription" SetFocusOnError="true" runat="server" ValidationGroup="propertyentry" ErrorMessage="<br />Please enter description" ForeColor="Red" Display="Dynamic" /></span>
                        </td>
                    </tr>
                    <a name="#Lister"></a>
                    <tr>
                        <th scope="row">Responsible Agent
                            
                        </th>
                        <td>
                            <asp:Label ID="lblSLister" runat="server" Font-Size="12px" />
                            <asp:TextBox ID="txtSLister" runat="server" Style="display: none" />
                            <asp:ImageButton ID="btnSListerList" runat="server" Text="Search" ImageUrl="~/images/style01/Btn-manify.png" />
                            <span style="color: Red">*</span>
                            <asp:RequiredFieldValidator ID="rfvtxtSLister" ControlToValidate="txtSlister"
                                SetFocusOnError="true" runat="server" ValidationGroup="PropertyEntry" ErrorMessage="<br />Required"
                                ForeColor="Red" Display="Dynamic" Enabled="false" />
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: 200px">Reminder Date :
                        </th>
                        <td style="width: 453px">
                            <div style="position: relative">
                                <asp:TextBox ID="txtReminder" Style="width: inherit" runat="server" MaxLength="30" />
                                <asp:ImageButton runat="Server" ID="imgToDateCal2" AlternateText="Click to show calendar" ImageUrl="~/images/style01/Btn-calendar.png" />
                                <cc1:CalendarExtender ID="CalendarExtender1" runat="server" Format="dd-MMM-yyyy" TargetControlID="txtReminder" PopupButtonID="imgToDateCal2" PopupPosition="BottomRight" />
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: inherit">Agent Remark :
                        </th>
                        <td style="width: 453px">
                            <asp:TextBox ID="txtAgentRemark" Style="width: inherit" runat="server" MaxLength="500" TextMode="MultiLine" ToolTip="Agent Remark" />
                        </td>
                    </tr>
                </table>
                <!-- For Popup - ListerList -->
                <asp:Panel ID="pnlListerListEntry" runat="server" CssClass="modalPopup" Style="display: none"
                    Width="700px" Height="600px">
                    <table border="0" cellpadding="0" cellspacing="0" class="PopupContainer" width="600">
                        <tr>
                            <td style="width: 30px; height: 41px" background="images/style01/PopupHead-top-left.gif"></td>
                            <td background="images/style01/PopupHead-top-middle.gif" valign="bottom">
                                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="PopupHeader">
                                    <thead>
                                        <tr>
                                            <td align="center" style="text-align: center" height="30">
                                                <asp:Label ID="lblListerListTitle" runat="server" Text="Lister List" />
                                            </td>
                                            <td align="right" style="text-align: right">
                                                <asp:ImageButton ID="imgbutListerListClose" runat="server" Width="20px" Height="20px"
                                                    AlternateText="Close" ImageUrl="~/images/style01/Btn-Close.png" />
                                            </td>
                                        </tr>
                                    </thead>
                                </table>
                            </td>
                            <td style="width: 30px; height: 41px" background="images/style01/PopupHead-top-right.gif"></td>
                        </tr>
                        <tr>
                            <td width="30" height="30" background="images/style01/Popup-PropertyType-left.gif">&nbsp;</td>
                            <td background="images/style01/Popup-PropertyType-middle.gif" style="background-color: white;">&nbsp;</td>
                            <td background="images/style01/Popup-PropertyType-right.gif">&nbsp;</td>
                        </tr>
                        <tr>
                            <td style="width: 30px" background="images/style01/Popup-left-middle.gif"></td>
                            <td bgcolor="#FFFFFF">
                                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="PopupDataDisplay" style="height: 100%; background-color: #FFFFFF;">
                                    <tr>
                                        <td>
                                            <div style="height: 500px; overflow: auto;">
                                                <table width="100%">
                                                    <tr>
                                                        <td>
                                                            <strong>Lister Name</strong>
                                                        </td>
                                                        <td></td>
                                                    </tr>
                                                    <asp:Repeater ID="repListerList" runat="server">
                                                        <ItemTemplate>
                                                            <tr>
                                                                <td>
                                                                    <asp:LinkButton ID="lbtrepListerListEdit" runat="server" Text='<%#Container.DataItem("Name").ToString%>'
                                                                        CommandName="SelectItem" CommandArgument='<%# DataBinder.Eval(Container,"ItemIndex") %>' /><asp:Label
                                                                            ID="lblRepListerListId" runat="server" Text='<%#Container.DataItem("StaffId").ToString%>'
                                                                            Visible="false" />
                                                                </td>
                                                                <td></td>
                                                            </tr>
                                                        </ItemTemplate>
                                                    </asp:Repeater>
                                                </table>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </td>

                            <td style="width: 30px" background="images/style01/Popup-right-middle.gif"></td>
                        </tr>
                        <tr>
                            <td style="width: 30px; height: 55px" background="images/style01/Popup-bottom-left.gif"></td>
                            <td style="text-align: right" background="images/style01/Popup-bottom-middle.gif">&nbsp;</td>
                            <td style="width: 30px; height: 55px" background="images/style01/Popup-bottom-right.gif"></td>
                        </tr>
                    </table>
                </asp:Panel>
                <asp:Button ID="btnListerListHiddenNew" runat="server" Style="display: none" />
                <cc1:ModalPopupExtender ID="mpeListerListEntry" runat="server" BackgroundCssClass="modalBackground"
                    DropShadow="false" PopupControlID="pnlListerListEntry" TargetControlID="btnListerListHiddenNew"
                    EnableViewState="True">
                </cc1:ModalPopupExtender>
                <!-- End Popup -->
                <!-- HIDDEN FIELD -->
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>


    <div class=" form-entry-container">

        <table width="100%" style="margin-left: 0px;">
            <tr>
                <td>
                    <div class="General-info-title-line"></div>
                </td>
                <td style="width: 300px;">
                    <asp:UpdatePanel ID="upPropertyEntry" runat="server">
                        <ContentTemplate>
                            &nbsp;<asp:Button ID="btnBack" runat="server" Text="Cancel" CssClass="search-btn" Width="60" />
                            <asp:Button ID="BtnSave" runat="server" Text="Save" ValidationGroup="propertyentry" CssClass="search-btn" Width="80" OnClientClick="SetScrollEvent();" />
                            <asp:Button ID="btnUploadPhoto" runat="server" Text="Upload Photo" CssClass="search-btn" Width="80" />
                            <cc1:ConfirmButtonExtender ID="CBEBack" runat="server" TargetControlID="btnBack" ConfirmText="Do you want to cancel? All your unsaved data will be lost." />
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </td>
                <td style="width: 60px">
                    <div class="General-info-title-line"></div>
                </td>
            </tr>
        </table>
        <div class=" form-entry-title" style="line-height: 15px; margin-bottom: 0px; margin-top: 15px;"><span style="color: Red; font-size: 10px;">*Required fields</span></div>
    </div>


    <asp:Label ID="lblhidPropertyId" runat="server" Visible="true" />
    <asp:Label ID="lblhidRoadId" runat="server" Visible="False" />
    <asp:Label ID="lblhidProjectId" runat="server" Visible="False" />
    <asp:Label ID="lblhidPropertyTypeId" runat="server" Visible="false" />
    <asp:Label ID="lblhidSListerId" runat="server" Visible="false" />
    <asp:Label ID="lblhidRListerId" runat="server" Visible="false" />
    <asp:Label ID="lblhidListerType" runat="server" Visible="false" />
    <!-- to determine which lister type was clicked -->
    <asp:Label ID="lblhidStaffId" runat="server" Visible="false" />
    <asp:Label ID="lblhidStaffType" runat="server" Visible="false" />
    <asp:Label ID="lblhidISEFP" runat="server" Text="0" Visible="false" />
    <asp:Label ID="lblhidListType" runat="server" Visible="false" />
    <asp:Label ID="lblhidCreateDate" runat="server" Visible="false" />
    <asp:Label ID="lblhidSCreateDate" runat="server" Visible="false" />
    <asp:Label ID="lblhidRCreateDate" runat="server" Visible="false" />

</asp:Content>
